Skip to content

Conversation

@jackbdoughty
Copy link
Contributor

@jackbdoughty jackbdoughty commented Jul 7, 2025

Implements two new genie commands, for retrieving autosave frequency and setting it. Relies on ISISComputingGroup/EPICS-isisdae#98

@jackbdoughty jackbdoughty marked this pull request as ready for review July 7, 2025 15:36
Copilot AI review requested due to automatic review settings July 7, 2025 15:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for querying and configuring the ICP autosave frequency via new genie commands.

  • Introduces get_autosave_freq and set_autosave_freq in the DAE backend, simulation layer, and top-level usercommands
  • Updates PV name mappings for autosave frequency and its setpoint
  • Adds unit tests for the DAE implementation of the new commands

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
tests/test_genie_dae.py Adds tests for get_autosave_freq and set_autosave_freq
src/genie_python/genie_simulate_impl.py Stubs autosave_freq member and implements simulation logic
src/genie_python/genie_dae.py Defines real PV-based getters/setters for autosave frequency
src/genie_python/genie.py Registers new usercommands get_autosave_freq and set_autosave_freq
Comments suppressed due to low confidence (2)

src/genie_python/genie_simulate_impl.py:1095

  • Add a docstring to get_autosave_freq explaining what the simulation returns and any assumptions (e.g., default units or behavior).
    def get_autosave_freq(self) -> "PVValue":

src/genie_python/genie_simulate_impl.py:1095

  • There are no unit tests covering the simulation implementation of get_autosave_freq/set_autosave_freq. Adding tests here would ensure consistency between simulated and real behavior.
    def get_autosave_freq(self) -> "PVValue":

@Chsudeepta Chsudeepta removed the request for review from FreddieAkeroyd September 16, 2025 22:22
Chsudeepta
Chsudeepta previously approved these changes Sep 16, 2025
@Chsudeepta Chsudeepta closed this Sep 16, 2025
@Tom-Willemsen
Copy link
Member

@Chsudeepta this was closed instead of merged; was that intentional?

@Chsudeepta
Copy link
Contributor

@Tom-Willemsen Thanks for pointing, seems I did the same crime twice yesterday. I am reopening the PR

@FreddieAkeroyd
Copy link
Member

I wasn't keen on as_string on pvget with a method declared as int|None but removing it caused issues with float. In principle autosave can be frames or microamps (muons only ever use frames, and neutrons never use it, so it is principle rather than reality but the isisicp does allow it). Maybe making the frequency float will resolve things.

Jack Doughty and others added 2 commits September 19, 2025 16:27
@Chsudeepta Chsudeepta merged commit 9af767d into main Sep 19, 2025
15 checks passed
@Chsudeepta Chsudeepta deleted the autosave_freq branch September 19, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants